﻿; (function ($, window, document, undefined) {
    var myApp = window.myApp;
    var view = myApp.views.view;
    
    if (myApp.views.products == undefined)
        myApp.views.products = {};
    
    myApp.views.products.edit = mvc.define(function () {
        return {
            template: "edit product id @model.id <a id='back' href='#products'>Back</a>",
            init: function () {
                $("#back").click(function () {
                    alert('going back');
                });
            },
            destroy: function () {
                alert("view destroyed");
            }
        };
    }, view);
})(jQuery, window, document);